package com.yalantis.euclid.domains;

/**
 * @author Guo
 * @Date 2018年5月7日
 * 用于存放词频、Emotion衡量等
 */
public class WordInfo implements Comparable<WordInfo>{
    /**词*/
    private String realName;
    /**词用于衡量情绪的权重*/
    private Emotion wordEmotion;
    /**词频*/
    private int frequency;
    /**词性*/
    private String natureStr;
    @Override
    public String toString() {
        //String str = realName+"-"+natureStr+":"+frequency;
        String str = "\""+realName+"\":"+frequency;
        return str;
    }
    public String getNatureStr() {
        return natureStr;
    }
    public void setNatureStr(String nature) {
        this.natureStr = nature;
    }
    public String getRealName() {
        return realName;
    }
    public void setRealName(String realName) {
        this.realName = realName;
    }
    public Emotion getWordEmotion() {
        return wordEmotion;
    }
    public void setWordEmotion(Emotion wordEmotion) {
        this.wordEmotion = wordEmotion;
    }
    public int getFrequency() {
        return frequency;
    }
    public void setFrequency(int frequency) {
        this.frequency = frequency;
    }
    @Override
    public int compareTo(WordInfo o) {
        return o.getFrequency()-frequency;
    }

}
